﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UM_SERVER.Net
{
    class UdpPortListenManager : PortListenManager
    {
        public override bool InstallListener(PortListener Listener)
        {
            if (this.Add(Listener))
            {
                Listener.Start();
                return true;
            }
            return false;
        }

        public override bool RemoveListener(PortListener Listener)
        {
            if (this.Remove(Listener))
            {
                Listener.Stop();
                return true;
            }
            else
            {
                return false;
            }
        }

        public override bool RemoveListener(string Key)
        {
            return this.Remove(Key);
        }
    }
}
